package com.ht.demo.service.manager.system;

import com.ht.demo.common.appexception.AppException;

import java.util.List;
import java.util.Set;

public interface SysRoleMenuManager {
    /**
     * 保存角色与菜单的权限关系
     * @param sysRoleId
     * @param menuIdList
     * @return
     */
    Boolean saveRoleMenuRelation(Long sysRoleId, List<Long> menuIdList);

    Boolean deleteRelationByMenuId(Long sysMenuId);

    Set<String> getPermission(Long sysRoleId);

    /**
     * 根据角色ID获取菜单ID集合
     * @param sysRoleId
     * @return
     * @throws AppException
     */
    List<Long> getMenuIdListByUserId(Long sysRoleId) throws AppException;
}
